﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Himp.ShareData;

namespace Himp.Platform
{
    /// <summary>
    /// 患者
    /// </summary>
    public class PatnsQuery : ISingletonDependency
    {
        private readonly IServiceProvider _serviceProvider;

        public PatnsQuery(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
        }

        public async Task<PagedResultDto<PatnMasterIdxDto>> GetPatnMasterIdxListAsync(PatnMasterIdxInput input)
        {
            var patnMasterIdxService = _serviceProvider.GetService<IPatnMasterIdxService>();

            return await patnMasterIdxService.GetListAsync(input);
        }

        public async Task<PagedResultDto<PatnBaseInfoDto>> GetPatnBaseInfoListAsync(PatnBaseInfoInput input)
        {
            var patnBaseInfoService = _serviceProvider.GetService<IPatnBaseInfoService>();

            return await patnBaseInfoService.GetListAsync(input);
        }
    }
}
